#!/bin/bash

# 多账户交易机器人测试启动脚本

echo "🧪 多账户交易机器人测试启动"
echo "=================================="

# 设置环境变量
export DEEPSEEK_API_KEY="sk-ebaef4e298924d6a9b9c524fa1e09f13"
export OKX_DEMO_API_KEY="816ccb0a-b6b3-4333-aad2-bc688b5761b8"
export OKX_DEMO_SECRET_KEY="2A948C9BFEC78399D9079CD48362AA91"
export OKX_DEMO_PASSPHRASE="6V^i4VekVnjF%8W@"
export TELEGRAM_BOT_TOKEN="8348479148:AAGhFK8rl8ODCiICJ9WdgmJohCPNN0C7quA"
export TELEGRAM_DEMO_CHAT_ID="-4869170379"
export TELEGRAM_LIVE_CHAT_ID="-4869170379"

echo "✅ 环境变量已设置"

# 激活虚拟环境
source venv/bin/activate
echo "✅ 虚拟环境已激活"

# 运行测试
echo "🧪 运行功能测试..."
python3 test_multi_account.py

echo ""
echo "🚀 启动多账户管理器（30秒测试）..."
timeout 30 python3 multi_account_manager.py

echo ""
echo "🎯 测试完成！"
echo "如果看到以下信息说明多账户功能正常："
echo "  - ✅ 交易所初始化成功"
echo "  - ✅ Telegram 消息已发送"
echo "  - ✅ 账户启动成功"
echo "  - 🎯 多账户系统运行中"
